{include file="../view/head" /}
<style>
    #user_list .panel-heading>form{
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-right: 40px;
    }
    #user_list .panel-heading>form>div>label{
        width: 100%;
        background: #666;
        color: #fff;
        border-radius: 4px 4px 0 0;
        border: 1px solid #666;
        margin: 0;
        text-align: center;
    }
    #user_list .panel-heading>form>div>.form-control{
        border-radius: 0 0 4px 4px;
        border: 1px solid #666;
        padding: 0;
        height: auto;
    }
    td>.btn{font-weight: normal;}
</style>
</head>
<body>
{include file="../view/header" /}
{include file="../view/sidebar" /}
{include file="../view/right-sidebar" /}
<!-- Start #content -->
<div id="content">
    <!-- Start .content-wrapper -->
    <div class="content-wrapper">
        <div class="row">
            <!-- Start .row -->
            <!-- Start .page-header -->
            <div class="col-lg-12 heading hidden-xs hidden-sm">
                <!-- Start .bredcrumb -->
                <ul id="crumb" class="breadcrumb"></ul>
                <!-- End .breadcrumb -->
            </div>
            <!-- End .page-header -->
        </div>
        <!-- End .row -->
        <div class="outlet">
            <!-- Start .outlet -->
            <!-- Page start here ( usual with .row ) -->
            <div class="row">
                <div class="col-md-12" id="user_list">
                    <!-- col-lg-12 start here -->
                    <div class="panel panel-default toggle panelRefresh">
                        <!-- Start .panel -->
                        <div class="panel-heading" style="padding: 10px 15px;">
                            <form action="{:url('trade/complete')}" method="post">
                                {:token()}
                                <a href="{:url('trade/complete')}" class="btn btn-primary">恢复<br>默认</a>
                                <div style="width:110px;">
                                    <label>搜索用户</label>
                                    <input class="form-control" type="number" name="uname" value="{$param.uname?:''}" oninput="if(value.length>11)value=value.slice(0,11)">
                                </div>
                                <div style="width:110px;">
                                    <label>搜索订单号</label>
                                    <input class="form-control" type="number" name="order_sn" value="{$param.order_sn?:''}" oninput="if(value.length>20)value=value.slice(0,20)">
                                </div>
                                <button type="submit" class="btn btn-primary">筛<br/>选</button>
                            </form>
                        </div>
                        <div class="panel-body">
                            <table class="table table-bordered table-hover table-striped">
                                <thead>
                                <tr>
                                    <th class="per5">
                                        <label class="checkbox">
                                            <input class="check-all" type="checkbox">
                                        </label>
                                    </th>
                                    <th>单号</th>
                                    <th>求购会员</th>
                                    <th>求购数量</th>
                                    <th>单价(元)</th>
                                    <th>总价(元)</th>
                                    <th>完成时间</th>
                                    <!--<th style="width: 115px;">操作</th>-->
                                </tr>
                                </thead>
                                <tbody>
                                {foreach $lists as $list}
                                <tr>
                                    <td>
                                        <label class="checkbox">
                                            <input class="check" type="checkbox" value="{$list.id}">
                                        </label>
                                    </td>
                                    <td><h5 class="m0">{$list.p_order_sn}</h5></td>
                                    <td>{$list.p_user}</td>
                                    <td>{$list.num*1}</td>
                                    <td>{$list.price}</td>
                                    <td>{$list.total_money}</td>
                                    <td>{$list.update_time|date='Y-m-d H:i:s',###}</td>
                                    <!--<td>
                                        <a href="{:url('fabu/wenzhang_del',['id'=>$list.id])}" class="mt5 btn btn-xs btn-danger">删除</a>
                                    </td>-->
                                </tr>
                                {/foreach}
                                </tbody>
                            </table>
                            <div class="row">
                                <div class="col-md-6">
                                    {$lists->render()}
                                </div>
                                <div class="col-md-6">
                                    <p>总数：{$lists->total()}</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Page End here -->
        </div>
        <!-- End .outlet -->
    </div>
    <!-- End .content-wrapper -->
    <div class="clearfix"></div>
</div>

<!-- End #content -->
{include file="../view/foot" /}
<script src="/public/theme/win10/assets/plugins/forms/checkall/jquery.checkAll.js"></script>
</body>
</html>